package org.sy.lab.多线程基础._4_执行器._3_分离任务启动和结束的处理;

import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;

public class Processor implements Callable<String> {

	private String name;
	
	public Processor(String name) {
		this.name = name;
	}
	
	@Override
	public String call() throws Exception {
		TimeUnit.SECONDS.sleep((long) (Math.random() * 3));
		System.out.println(name + "生产产品完成");
		return name + "生产的产品";
	}
}
